<% if @results.empty? %>
'<%=h @phrase %>' not found!<% else %>
<% if @results.empty? %>
No se encontro <%= @search %>
<% else %>
<table border="1">
    <tr>
        <th align='left'>
            ID
        </th>
        <th align='left'>
            Nombre del caballo
        </th>
        <th align='left'>
            Sexo
        </th>
        <th align='left'>
            Año de nacimiento
        </th>
        <th align='left'>
            Opciones
        </th>
    </tr>
    <% @results.each do |horse| %>
    <tr onmouseover="this.style.background='#BEE696'",  onmouseout="this.style.background='white'" bgcolor="white">
        <td width='100px' height="32px">
            <%=h horse.id %>
        </td>
        <td width='250px' height="32px">
            <%=h horse.horse_name %>
        </td>
        <td width='150px' height="32px">
            <%=h Horsesexe.find(horse.horse_sex_id).sex_name %>
        </td>
        <td width='200px' height="32px">
            <% if horse.born==nil %>
            No hay datos<% else %>
            <%=h horse.born %>
            <% end %>
        </td>
        <td width='150px' height="32px">
            <%= link_to '<img src="/images/profile.png" border="0px" align="left" style="padding-right:10px"; alt="Ver Perfiel" title="Ver Perfiel">', horse,:class=>'opacityit' %>
            <%= link_to '<img src="/images/edit.png" border="0px" align="left" style="padding-right:10px" alt="Editar" title="Editar Perfiel">', edit_horse_path(horse),:class=>'opacityit' %>
        </td>
    </tr>
    <%end %>
</table>
<% end %>
<%= will_paginate @results %>
<% end %>
